package cn.seqdata.forecast.model.smoothing;

import cn.seqdata.forecast.model.AbstractModel;
import cn.seqdata.forecast.model.ModelParams;
import org.hawkular.datamining.forecast.AutomaticForecaster;
import org.hawkular.datamining.forecast.models.DoubleExponentialSmoothing;
import org.hawkular.datamining.forecast.models.Model;

public class DoubleExponentialSmoothingModel extends ExponentialSmoothingModel {

	@Override
	public AbstractModel<ModelParams> create(ModelParams params) {
		DoubleExponentialSmoothingModel model = new  DoubleExponentialSmoothingModel();

		model.create(Model.DoubleExponentialSmoothing, params);

		DoubleExponentialSmoothing usedModel = DoubleExponentialSmoothing.createWithSmoothingParams(	//
		params.getDouble("levelSmoothing"),params.getDouble("trendSmoothing"));
		model.setForecaster(new AutomaticForecaster(context, config, usedModel));

		return model;
	}
}
